import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class code1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long a = in.nextLong(), h = in.nextLong();
        long b = in.nextLong(), k = in.nextLong();
        long sum = 0;
        while (h > 0 && k > 0) {
            sum += (a + b);
            h -= b;
            k -= a;
        }
        if (h <= 0 && k <= 0) System.out.print(sum);
        else {
            sum += 10*(h<=0?b:a);
            System.out.print(sum);
        }
    }
}